<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="../js/axios.js"></script>
	</head>
	<body>
		<h1>案例测试-2</h1>
		<script>
			let url1 = "http://localhost:8080/axios/saveUser"
			let user1 = {name:"张三",age:5,sex:"男",id:100
			}
			axios.post(url1,user1)
				.then(function(promise){
					console.log(promise.data)
				
				})
				
				let url2 = "http://localhost:8080/axios/updateUser"
				let user2 = {id:200,name:"肥冬",age:18,sex:"女"}
				axios.put(url2,user2)
					.then(function(promise){
						console.log(promise.data)
					})
					
				let url3 = "http://localhost:8080/axios/delite"
				let user3 = {id:200,name:"肥冬",age:18,sex:"女"}
				axios.delete(url3,{params:user3})
					.then(function(promise){
						console.log(promise.data)
					})
		</script>
	</body>
</html>
